package 创建型模型.工厂模式.简单工厂;

public class Factory {
    public static Car createCar(String type){
        switch (type) {
            case "BMW":
                return new BMW();
            case "BYD":
                return new BYD();
            default:
                return null;
        }
    }
}
